package com.treasure.mall.zbq.common.base;

/**
 * @author allan
 * @date 25/12/2017
 */
public enum ResultCodeEnum {
    /**
     *
     */
    ERROR(0, "请求失败"),
    SUCCESS(2000, "请求成功"),
    ILLEGAL_STATE(2001, "错误状态"),
    OPERATION_FAILED(4000, "操作失败"),
    NO_AUTHORITY(4001, "没有权限"),
    INVALIDATE_PARAMS(4002, "未传入有效的 appId 和 appKey"),
    LOGIN_FAILED(4003, "登录名或密码错误"),
    USER_LOCKED(4004, "该账户已被锁定"),
    EXCEPTION(5000, "系统请求失败"),
    THIRD_ERROR(5001, "第三方接口请求失败"),
    NOT_AUTHORITY(403, "没有访问权限"),
    VERIFY_CODE_FAILED(4004, "验证码有误"),
    UNRECOGNIZED_IDENTITY(4005, "无法识别身份信息"),

    SIGN_NULL(3000, "签名参数未传"),
    SIGN_FAILED(3001, "签名错误"),

    BIZ_ERROR(6000, "业务错误"),

    //参数错误
    PARAMETER_FAILED(60002, "参数错误"),
    NOT_LOGIN(61001, "未登录"),
    LIVE_FAILED(61003, "直播间异常"),


    SMS_FAILED(70001, "验证码发送失败"),
    SMS_VERIFY_FAILED(70002, "验证码不正确"),
    SMS_TOO_OFTEN_FAILED(70003, "操作太频繁，请稍后再试!"),

    INTEGRAL_FAILED(70004, "积分不够"),

    /**
     * alert 错误码 区间80001~81000
     */
    ALERT_FAILED(80001, "错误状态"),
    ;

    private int resultCode;
    private String resultMsg;

    ResultCodeEnum(int resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public String getResultMsg() {
        return resultMsg;
    }

    public void setResultMsg(String resultMsg) {
        this.resultMsg = resultMsg;
    }
}
